<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="my" uri="/mytags"%><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改密码</title>
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/asserts/bootstrap-3.3.7-dist/css/bootstrap.min.css" />

<!-- js插件 -->
<script src="${pageContext.request.contextPath}/js/jquery-3.2.1.min.js"></script>
<script
	src="${pageContext.request.contextPath}/asserts/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/asserts/bootstrapValidate/css/bootstrapValidator.min.css" />
<script
	src="${pageContext.request.contextPath}/asserts/bootstrapValidate/js/bootstrapValidator.min.js"></script>

</head>
<body>
	<div>
		<!-- 导航 -->
		<ol class="breadcrumb">
			<li><i class="fa fa-comment"></i> 用户修改密码</li>
		</ol>
		<div class="container">
			<div class="row">
				<form
					action="${pageContext.request.contextPath}/user/updatePwd"
					accept-charset="UTF-8"   method="post"
					class="form-horizontal">
					 <input type="hidden" name="id"  value="${user.id}"
								class="form-control" />
					 
					<div class="form-group">
						<label class="control-label col-md-3">用户名：</label>
						<div class="col-md-8">
							<input type="text" name="name" readonly="readonly"  value="${user.usercode}"
								class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">用户级别：</label>
						<div class="col-md-8">
							 <input type="text" name="usercode" readonly="readonly"  value="${user.userlevel}"
								class="form-control" />

						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">密码：</label>
						<div class="col-md-8">
							 <input type="password" name="password" readonly="readonly"  value="${user.password}"
								class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">新密码：</label>
						<div class="col-md-8">
							 <input type="password" name="newpassword"  placeholder="请输入新密码"
								class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">确认新密码（必须新密码一致）：</label>
						<div class="col-md-8">
							 <input type="password" name="newrepassword"  placeholder="请输入确认密码新密码"
								class="form-control" />
						</div>
					</div>
					
					 
					<div class="form-group">
						<label class="control-label col-md-3"> </label>
						<div class="col-md-8">
							<div class="col-md-6">
								<button class="btn btn-primary btn-block" type="submit"
									id="submitBtn">修改密码</button>
							</div>
							<div class="col-md-6">
								<button class="btn btn-danger btn-block" type="reset">取消</button>
							</div>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>

	<script type="text/javascript">
		 
		
		 document.documentElement.style.overflowY = 'hidden';
	</script>
	<script type="text/javascript">
	 $(function () {
	  
        $('form').bootstrapValidator({
　　　　　　　　message: 'This value is not valid',
            　feedbackIcons: {
                　　　　　　　　valid: 'glyphicon glyphicon-ok',
                　　　　　　　　invalid: 'glyphicon glyphicon-remove',
                　　　　　　　　validating: 'glyphicon glyphicon-refresh'
            　　　　　　　　   },
            fields: {
            	newpassword: {
                    message: '用户名验证失败',
                    validators: {
                        notEmpty: {
                            message: '新密码不能为空'
                        }
                    }
                },
                newrepassword: {
                    validators: {
                        notEmpty: {
                            message: '确认密码不能为空'
                        }
                    }
                } 
            } ,
            submitHandler: function (validator, form, submitButton) {
              // alert("submit");
            }
        });
    });
	
</script>

</body>


</html>
